@model ViewForumModel
@using LastoRevival.Service.Contracts.Models;

<div id="forumDetails">
    <span id="threadsInForum">@string.Format(LanguageLoader.GetWord("ThreadsInForumFormat"), Model.Threads.Count(), Model.ForumDetails.ThreadCount)</span>
    <span id="totalMessages">@string.Format(LanguageLoader.GetWord("TotalMessagesFormat"), Model.ForumDetails.MessageCount)</span>
    <span id="forumPageInfo">@string.Format(LanguageLoader.GetWord("ForumPageInfoFormat"), Model.Threads.CurrentPage, Model.Threads.TotalPages)</span>
	
	@if (Html.Profile().IsAdministrator)
	{
		<script type="text/javascript">

			$(function ()
			{
				$("#administerForum").dialog(
				{
					autoOpen: false,
					modal: true
				});
			});

			function showAdmin()
			{
				$("#administerForum").dialog("open");
			}
		
		</script>
		<a href="javascript:showAdmin()">Admin Options</a>
		<div id="administerForum" title="Forum Administration Functions">
			<a href="@Url.Action("EditForumForm", "Admin", new { forumID = Model.ForumDetails.ForumID })">Edit Details</a> <br /><br />
			<a href="@Url.Action("EditForumAccessForm", "Admin", new { forumID = Model.ForumDetails.ForumID })">Edit Permissions</a> <br /><br />
			<a href="@Url.Action("ConfirmDeleteForum", "Admin", new { forumID = Model.ForumDetails.ForumID })">Delete</a>
		</div>
	 
	}
</div>